package com.lightsaber.trade.as.dao.reta;

import java.util.List;

import org.springframework.stereotype.Repository;

import com.lightsaber.trade.as.entity.reta.Order;
import com.lightsaber.trade.as.entity.reta.OrderItem;
import com.lightsaber.trade.core.dao.BaseDao;

@Repository
public class OrderItemDao extends BaseDao<OrderItem, String> {

    public List<OrderItem> findByOrder(Order order) {

        addOrder(org.hibernate.criterion.Order.asc("createdDate"));

        eq("order", order);

        return list();
    }
}
